// Copyright 2023 Redpanda Data, Inc.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.md
//
// As of the Change Date specified in that file, in accordance with
// the Business Source License, use of this software will be governed
// by the Apache License, Version 2.0

package errors

import "google.golang.org/genproto/googleapis/rpc/errdetails"

// NewBadRequest is a constructor for creating bad request
func NewBadRequest(fieldValidations ...*errdetails.BadRequest_FieldViolation) *errdetails.BadRequest {
	return &errdetails.BadRequest{FieldViolations: fieldValidations}
}
